<include file="head"/>
                <div class="m-table-box">
                    <div class="m-table conv-table" id="conv-table" style="">
                        <table border="0" cellpadding="0" cellspacing="0" class="tbl-main">
                            <thead>
                            <tr><th>消息时间 </th>
                            <th>标题</th>
                          
                            <th>状态</th>
                            <th>操作</th>
                            </tr></thead>
                            <tbody id="log">
							<foreach name="sms" item="vo">
							<tr><td><?php echo date('Y-m-d H:i:s',$vo['add_time']);?></td><td style="cursor:pointer;" onclick="getSmsOne({$vo.id},1)">{$vo.remark}<img src="__HOME_CSS__/agent/images/look.gif" style="vertical-align:middle;"></td><td id="r_{$vo.id}"><?php if($vo['read']==1){?><span class="conv-status">已读</span><?php }else{?><span class="conv-warn">未读</span><?php }?></td><td><a href="javascript:void(0);" onclick="delSmsOne({$vo.id},<?php echo $p?>,0)">删 除</a></td></tr>
							</foreach>
							</tbody>
                        </table>
                    </div>
                    <div class="page-box" id="page">{$page}</div>                   
                </div>
            </div>
        </div> 
        <script src="__HOME_CSS__/agent/js/jquery-1.js"></script>
        <!-- <script src="js/socket.io.js"></script>
        <script src="js/sendSms.js"></script> -->
        <script src="__HOME_CSS__/agent/js/layer.js"></script>
        <!-- <script src="js/main.js"></script>
        <script src="js/index.js"></script> -->
        <script src="__HOME_CSS__/agent/js/ZeroClipboard.js"></script>
        <script src="__HOME_CSS__/agent/js/jquery.browser.js"></script>
        <script type="text/javascript">
            function delSmsOne(vnum, page,look) {
                layer.confirm("确定要删除信息吗？",{btn: ['确定','取消']},function(){
                    var surl = "/index.php/Agent/delSmsOne/id/" + vnum+"/look/"+look;
                    $.get(surl, function (data) {
                        if (data.status <= 0) {
                            alert(data.info);
                            return false;
                        } else {
                            var msg = data.msg;
                            layer.alert(msg, {icon: 1});
							setTimeout(function(){
							  window.location.href="/index.php/Agent/sms/p/"+page;},1000)
                          
                        }
                    }, "json");
                },function(e){
                    layer.close(e);
                });
                
            }

            function getSmsOne(vnum, page) {
                var surl = "/index.php/Agent/getSmsOne/id/" + vnum;
                $.get(surl, function (data) {
                    if (data.status <= 0) {
                        alert(data.info);
                        return false;
                    } else {
                        var msg = data.msg;
						$("#r_"+vnum).html(data.text);
                        layer.alert(msg, {icon: 1});
                        getLoad(page);
                    }
                }, "json");
            }

            function goIndex(){
                window.location.href = "index.html";
            }

            function salfOut(){
                // $.post("/app/member/index/loginOut",{t:Math.random()},function(data){
                //     if(data.status<=0){
                //         layer.alert(data.info);
                //         return false;
                //     }else{
                //         window.location.href="/agent/login.html";
                //     }
                // },"json");
                window.location.href="login.html";
            }
        </script>
    </body>
</html>